﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


    public class RainEx
    {
        public static DateTime StringToDTM(string recTime)
        {
            string result = "";
            if (recTime.Length == 12)
            {
                result = recTime.Insert(10, ":").Insert(8, " ").Insert(6, "-").Insert(4, "-");
            }

            DateTime dtm;
            DateTime.TryParse(result, out dtm);
            return dtm;
        }


        public static double StringToDouble(string rain)
        {
            double dResult = 0;
            double.TryParse(rain, out dResult);
            return dResult;
        }
    }
